projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a68e76e
)
cssimage: Add a warning for drawing empty images
author
Benjamin Otte
<otte@redhat.com>
Fri, 26 Oct 2012 23:31:59 +0000
(
01:31
+0200)
committer
Benjamin Otte
<otte@redhat.com>
Wed, 31 Oct 2012 10:09:10 +0000
(11:09 +0100)
width and height of an image must be > 0 for the image to get drawn.
It's up to the code further up to ensure that this is not happening.
gtk/gtkcssimage.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssimage.c
b/gtk/gtkcssimage.c
index abe95ae6c01cfc1ee8b33035d0140d3f21f84e8a..167af64a9117b02624ab0cfcef6d88bd49651ccb 100644
(file)
--- a/
gtk/gtkcssimage.c
+++ b/
gtk/gtkcssimage.c
@@
-229,6
+229,8
@@
_gtk_css_image_draw (GtkCssImage *image,
g_return_if_fail (GTK_IS_CSS_IMAGE (image));
g_return_if_fail (cr != NULL);
+ g_return_if_fail (width > 0);
+ g_return_if_fail (height > 0);
cairo_save (cr);